#include "linklist.h"


int main(int argc, char const *argv[])
{
    /* code */

    linknode *head  = NULL;
    int i = 0;
    datatype data;
    int remove_data = 0;
    head = create_empty_linklist();
    
    printf("please input %d number data \n", MAX);
    for(i = 0; i < MAX; i++) {
        scanf("%d", &data);
        insert_head_linklist(head, data);
    }
    // 头插法输出是反的
    print_data_linklist(head);


    printf("please input your want to delete data: ");
    scanf("%d", &remove_data);
    int res = delete_data(head, remove_data);
    // 头插法输出是反的
    print_data_linklist(head);

    //链表逆置测试
    reverse_linklist(head);
    print_data_linklist(head);
    return 0;
}

